refine(otaproxy): cache_index: store pre-computed headers dict; read_file_once: skip fadvise for small files read#913
Merged
Bodong-Yang merged 8 commits intomainfrom Apr 21, 2026
Conversation
read_file_once: no hint for small files change CacheIndexEntry layout
Contributor
📊 OTA Update Performance Comparison Report
⏱️ Execution Time
|
…ring, no need to intern the compression_alg
|
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Following #884 and #895, this PR applies another optimizations to the otaproxy:
now the element of the in-memory cache, the CacheIndexEntry stores the pre-computed read-only header(as
CIMultiDictProxy), directly ready for use, reducing two header builds per request to one.for small files handling path(
read_file_once), skip two syscalls of fadvice, as small files grow the memory usage much slower, kernel can handle the cache evicts without much problem.The above two optimizations further reduce processing time cost per-request, contributing to faster request handling.
Check list